#!/usr/bin/python3
# -*-coding:UTF-8-*-

import pymysql


import json



db = pymysql.connect(
	host='0.0.0.0',user='127.0.0.1',
	password='b636ptFKKrkBK8jz',
	database='127.0.0.1',
	port=3306,charset='utf8',
	autocommit=True,
	cursorclass=pymysql.cursors.DictCursor
)

base = db.cursor()
sql='update t_db set ip="111.111.111.111" where id=14'

base.execute(sql)


sql='INSERT INTO t_db set start_time=1,area=1, source=1, access_page=1, searchword=1, ip=1, visitorId=1, visit_pages=1'

base.execute(sql)

sql='delete from t_db where id=20'

base.execute(sql)

sql='select * from t_db'

base.execute(sql)

res=base.fetchall()


print(res)

base.close()

db.close()



